package com.ozo.cloud.auth.exception;

import com.ozo.cloud.common.base.exception.AbstractExceptionEnum;
import lombok.Getter;

/**
 * 认证异常信息
 *
 * @author qiangesoft
 * @date 2024-06-28
 */
@Getter
public enum AuthExceptionEnum implements AbstractExceptionEnum {

    /**
     * 10000~19999之间
     */
    USERNAME_OR_PASSWORD_ERROR(10000, "用户名或密码错误"),
    CAPTCHA_ERROR(10001, "图形验证码错误"),
    QUERY_USER_FAIL(10002, "用户查询失败"),
    PARAM_GRANT_TYPE_ERROR(10003, "参数grantType不正确"),
    PARAM_REFRESH_TOKEN_ERROR(10004, "refreshToken无效"),
    SMS_CODE_ERROR(10005, "短信验证码错误"),
    MOBILE_NOT_EXISTS(10006, "手机号不存在"),
    SMS_SEND_FAIL(10007, "短信发送失败"),
    ACCOUNT_DISABLED(10008, "账号已禁用"),

    ;


    private Integer code;

    private String message;

    AuthExceptionEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

}
